﻿function actionActivity(aid, item, TemplateID) {
    $.ajax({
        type: "get",
        url: '/app/PreView/GetAwards',
        data: { "aId":aid },
        async: false,
        success: function (data) {
            var Denomination = data.Denomination;
            if (data.Denomination == -1) { //没有中到奖品
                // 跳转到没中奖页面
                GetError(TemplateID);
            }
            else {  //中到奖品了
                if (data.type == 3) { //流量
                    //  data.Denomination = data.Name;
                }
                else if (data.type == 2) {//优惠券
                }
                else { //红包
                    $('.bg-con .small-bg #showMoney').text(data.Denomination).parent().next().text(data.EnterpriseName).next().text(data.Name);
                    $('.bg-con .small-bg .add').attr('href', 'Verification?awId=' + data.Id + '&Aid=' + data.ActivityId + '&Denomination=' + data.Denomination);
                    $('.clickRequest').next('.bg-con').css('display', 'block').children('.small-bg').children('p:nth-child(1)').addClass('animated bounceInLeft');
                    $('.clickRequest').next('.bg-con').children('.small-bg').children('a.add').addClass('animated  zoomIn');
                }
            }
        }
    });
}